package com.wzdigit.wms.raw.mapper.asn;

import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.domain.asn.AsnDtl;
import com.wzdigit.wms.raw.client.request.asn.receive.SearchAsnDtlReceiveRequest;
import com.wzdigit.wms.raw.client.request.asn.receive.UpdateAsnDtlQtyReceiveRequest;
import com.wzdigit.wms.raw.client.response.asn.receive.AsnDtlReceiveResponse;
import com.wzdigit.wms.raw.domain.dto.PreAsnReceiveDtlDto;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * 收料入库明细Mapper
 * Created by zyf on 2021/7/1 11:05
 */

@MyBatisRepository
public interface AsnReceiveDtlMapper extends BaseMapper<AsnDtl> {

    List<AsnDtlReceiveResponse> selectReceive(
    		@Param("dto") SearchAsnDtlReceiveRequest dto,
    		@Param("whsIdList") List<Integer> whsIdList,
            @Param("skuIdList") List<Integer> skuIdList);
    
    List<PreAsnReceiveDtlDto> selectPreByAsnHeaderIdAndSkuId(
    		@Param("asnHeaderId") Integer asnHeaderId, @Param("skuId") Integer skuId);
    
    int updateQtyById(UpdateAsnDtlQtyReceiveRequest dto);


    int updateUdf4ById(@Param("asnDtlId") Integer asnDtlId,@Param("sapBackId") String sapBackId);
}